package com.leoman.service;

import com.leoman.entity.Attention;
import com.leoman.entity.vo.UserInfoVo;
import com.leoman.exception.AttentionExistException;
import com.leoman.exception.AttentionNotFindException;
import com.leoman.exception.ParamErrorException;
import com.leoman.service.common.ICommonService;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * AttentionService
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:51.
 */
public interface AttentionService extends ICommonService<Attention> {

    // 随机查询三个没有互相关注的用户信息
    List<UserInfoVo> findThreeUserInfo(Integer userId);

    // 粉丝列表or关注列表（分页）
    Page<UserInfoVo> iPageByParams(Integer userId, Integer type, Integer pageNum, Integer pageSize);

    // 关注or取消关注
    void iModifyAttentionInfo(Integer userId,
                              Integer sourceId,
                              Integer type)
            throws ParamErrorException,
            AttentionNotFindException,
            AttentionExistException;

    // 是否互相关注
    Boolean isAttentionAll(Integer fromUserId, Integer toUserId);
}